// main pages
import Login from 'pages/Login.vue'
import NotFound from 'pages/404.vue'
import Home from 'pages/Home.vue'
import Main from 'pages/Main.vue'

// nav1 pages
import NewLoan from 'pages/nav1/NewLoan'
import CheckLoan from 'pages/nav1/CheckLoan'
import ReleaseLoan from 'pages/nav1/ReleaseLoan'

// nav2 pages
import AutoSignBind from 'pages/nav2/AutoSignBind'
import AdvanceRepayment from 'pages/nav2/AdvanceRepayment'
import NormalRepayment from 'pages/nav2/NormalRepayment'
import FrozenRepayment from 'pages/nav2/FrozenRepayment'
import MatureRepayment from 'pages/nav2/MatureRepayment'

// nav3 pages
import Member from 'pages/nav3/Member'

// nav4 pages
import Echarts from 'pages/charts/echarts.vue'

let routes = [{
    path: '/login',
    component: Login,
    name: '',
    hidden: true
  }, {
    path: '/404',
    component: NotFound,
    name: '',
    hidden: true
  },
  //{ path: '/main', component: Main },
  {
    path: '/',
    component: Home,
    name: '标的',
    iconCls: 'fa fa-money', //图标样式class
    children: [{
        path: '/main',
        component: Main,
        name: '主页',
        hidden: true
      },
      {
        path: '/newLoan',
        component: NewLoan,
        name: '发布新标的'
      },
      {
        path: '/checkLoan',
        component: CheckLoan,
        name: '标的审核'
      },
      {
        path: '/releaseLoan',
        component: ReleaseLoan,
        name: '标的放款'
      },
    ]
  }, {
    path: '/',
    component: Home,
    name: '还款',
    iconCls: 'fa fa-tasks',
    children: [{
      path: '/autoSignBind',
      component: AutoSignBind,
      name: '自动还款签约'
    }, {
      path: '/normalRepayment',
      component: NormalRepayment,
      name: '普通还款'
    }, {
      path: '/advanceRepayment',
      component: AdvanceRepayment,
      name: '提前还款'
    }, {
      path: '/frozenRepayment',
      component: FrozenRepayment,
      name: '还款冻结'
    }, {
      path: '/matureRepayment',
      component: MatureRepayment,
      name: '到期还款'
    }]
  }, {
    path: '/',
    component: Home,
    name: '',
    iconCls: 'fa fa-user',
    leaf: true, //只有一个节点
    children: [{
      path: '/member',
      component: Member,
      name: '会员管理'
    }]
  }, {
    path: '/',
    component: Home,
    name: '数据统计',
    hidden: true,
    iconCls: 'fa fa-bar-chart',
    children: [{
      path: '/echart',
      component: Echarts,
      name: 'echart'
    }]
  }, {
    path: '*',
    hidden: true,
    redirect: {
      path: '/404'
    }
  }
];

export default routes;